package org.training.apr.model.utils.builder;


import java.util.ArrayList;
import java.util.List;

import org.training.apr.model.Enterprise;

public class EnterpriseBuilder extends Builder {
	private String name = "Enterprise #" + id;
	private List<Enterprise> childs = new ArrayList<Enterprise>();
	
	public EnterpriseBuilder withName(String name) {
		this.name = name;
		return this;
	}
	
	public Builder withChilds(List<Enterprise> childs) {
		this.childs = childs;
		return this;
	}
	
	public Enterprise build() {
		Enterprise enterprise = new Enterprise(name);
		enterprise.setId(id);
		enterprise.setChilds(childs);
		
		return enterprise;
	}
}
